<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>滚动效果</title>
		<style type="text/css">
			.border {
				width: 500px;
				height: 500px;
				background: #CCCCCC;
				box-sizing: border-box;
				padding: 10px;
				display: flex;
				justify-content: space-between;
			}

			.border_left {
				width: 200px;
				height: 100%;
				background: red;
			}

			.border_right {
				width: 300px;
				height: 100%;
				background: green;
				overflow-x: auto;
				overflow-y: hidden;
				box-sizing: border-box;
				padding: 50px 0;
			}

			.border_right .right_text {
				width: 500px;
				height: 100%;
				background: #0000FF;
			}
		</style>
	</head>
	<body>
		<div class="border">
			<div class="border_left">
				左侧边
			</div>
			<div class="border_right">
				<div class="right_text">右侧内容</div>
			</div>
		</div>
	</body>
	<script type="text/javascript">
		b();


		function b(num1) {
			var weighnum;
			/* 方法1 */
			// function a(num2) {
			// 	return weighnum = num1 * num2
			// }
			/* 方法2 */
			var num2 = parseInt(10*Math.random());/* 生成一个0-10的随机数 */
			
			return  weighnum= num1 * num2;
		}
		var f = true;
		if (f === true) {
			var a = 10;
		}

		function fn() {
			var b = 20;
			c = 30;
		}

		fn();
		// console.log(a);
		// console.log(c);
		// console.log(b);
		var s = 'aaabbbcccaaabbbaaa';
		var obj = {};
		var maxn = -1;
		var letter;
		for (var i = 0; i < s.length; i++) {
			// console.log(obj[s[i]]);
			if (obj[s[i]]) {
				obj[s[i]]++;
				if (obj[s[i]] > maxn) {
					maxn = obj[s[i]];
					letter = s[i];
				}
			} else {
				obj[s[i]] = 1;
				if (obj[s[i]] > maxn) {
					maxn = obj[s[i]];
					letter = s[i];
				}
			}
		}

		// alert(letter + ': ' + maxn);
		function c(num){
			if(){
				
			}else{
				
			}
		}
		var b = [1,1,0,1,0,1];
		function fun1(b,c){
			var olnum = 0;
			for(var i=0;i<b.length;i++){
				if(b[i]%2 == 0){
					olnum++;
				}
			}
			console.log(olnum)
			c(olnum)
		}
		
	</script>
</html>
